((typeof self !== 'undefined' ? self : this)["webpackJsonpproduct_manager"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpproduct_manager"] || []).push([[1],{

/***/ "1954":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("5530");

// EXTERNAL MODULE: ./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js
var helper = __webpack_require__("2638");
var helper_default = /*#__PURE__*/__webpack_require__.n(helper);

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("d4ec");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("bee2");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("257e");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
var inherits = __webpack_require__("262e");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 2 modules
var createSuper = __webpack_require__("2caf");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("ade3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("b64b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
var es_function_name = __webpack_require__("b0c0");

// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
var tslib_es6 = __webpack_require__("9ab4");

// EXTERNAL MODULE: ./node_modules/vue-property-decorator/lib/vue-property-decorator.js
var vue_property_decorator = __webpack_require__("60a3");

// EXTERNAL MODULE: ./node_modules/vue-class-component/dist/vue-class-component.esm.js
var vue_class_component_esm = __webpack_require__("2fe1");

// EXTERNAL MODULE: ./src/mixins/httpMixin.ts
var httpMixin = __webpack_require__("81dc");

// EXTERNAL MODULE: external "Vuex"
var external_Vuex_ = __webpack_require__("5880");

// EXTERNAL MODULE: ./node_modules/js-cookie/dist/js.cookie.js
var js_cookie = __webpack_require__("852e");
var js_cookie_default = /*#__PURE__*/__webpack_require__.n(js_cookie);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/login.vue?vue&type=script&lang=tsx&




















var loginvue_type_script_lang_tsx_Login = /*#__PURE__*/function (_mixins) {
  Object(inherits["a" /* default */])(Login, _mixins);

  var _super = Object(createSuper["a" /* default */])(Login);

  function Login() {
    var _this;

    Object(classCallCheck["a" /* default */])(this, Login);

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _super.call.apply(_super, [this].concat(args));

    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "mode", 'login');

    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "form", {
      username: '',
      password: '',
      level: ''
    });

    Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "forgetPasswordForm", {
      username: '',
      old_pwd: '',
      new_pwd: ''
    });

    return _this;
  }

  Object(createClass["a" /* default */])(Login, [{
    key: "resetForm",
    value: function resetForm() {
      var form = this.$refs.form;
      form.resetFields();
    }
  }, {
    key: "submit",
    value: function submit(mode) {
      var _this2 = this;

      this.$q.loading.show();

      if (mode === 'login') {
        this.http.login(this.form).then(function (res) {
          _this2.$q.loading.hide();

          js_cookie_default.a.set('logined', '1', {
            expires: 7
          });
          js_cookie_default.a.set('userName', _this2.form.username, {
            expires: 7
          });

          _this2.setLoginStatus(true);

          _this2.setUserName(_this2.form.username);
        }).catch(function (err) {
          _this2.resetForm();

          _this2.$q.loading.hide();

          _this2.showNotify({
            message: typeof err === 'string' ? err : '登录失败',
            type: 'negative',
            position: 'top',
            timeout: 2000
          });
        });
      } else {
        this.http.changePwd(this.forgetPasswordForm).then(function (res) {
          _this2.$q.loading.hide();

          js_cookie_default.a.remove('logined');
          js_cookie_default.a.remove('userName');

          _this2.setLoginStatus(false);

          _this2.setUserName(false);

          _this2.mode = 'login';

          _this2.resetForm();

          _this2.showNotify({
            message: '修改成功! 请重新登录',
            type: 'positive',
            position: 'top',
            timeout: 2000
          });
        }).catch(function (err) {
          _this2.$q.loading.hide();

          _this2.showNotify({
            message: typeof err === 'string' ? err : '修改密码失败',
            type: 'negative',
            position: 'top',
            timeout: 2000
          });
        });
      }
    }
  }, {
    key: "formSubmit",
    value: function formSubmit(mode, e) {
      var _this3 = this;

      if (mode === 'login' && !Object.keys(this.form).some(function (k) {
        return !_this3.form[k];
      }) && e.keyCode === 13 || mode === 'forget' && !Object.keys(this.forgetPasswordForm).some(function (k) {
        return !_this3.forgetPasswordForm[k];
      }) && e.keyCode === 13) {
        this.submit(mode);
      }
    }
  }, {
    key: "forgetPassword",
    value: function forgetPassword() {
      this.mode = 'forget';
      this.resetForm();
    }
  }, {
    key: "backLogin",
    value: function backLogin() {
      this.mode = 'login';
      this.resetForm();
    }
  }, {
    key: "created",
    value: function created() {}
  }, {
    key: "mounted",
    value: function mounted() {}
  }, {
    key: "render",
    value: function render() {
      var _this4 = this;

      var h = arguments[0];
      return this.mode === 'login' ? h("el-form", helper_default()([{
        "ref": "form"
      }, {
        "props": {
          model: this.form
        }
      }, {
        "attrs": {
          "label-width": "80px",
          "size": "mini"
        },
        "nativeOn": {
          "keydown": this.formSubmit.bind(this, 'login')
        }
      }]), [h("el-form-item", {
        "attrs": {
          "label": "账号",
          "prop": "username"
        }
      }, [h("el-input", {
        "model": {
          value: _this4.form.username,
          callback: function callback($$v) {
            _this4.$set(_this4.form, "username", $$v);
          }
        }
      })]), h("el-form-item", {
        "attrs": {
          "label": "密码",
          "prop": "password"
        }
      }, [h("el-input", {
        "attrs": {
          "type": "password"
        },
        "model": {
          value: _this4.form.password,
          callback: function callback($$v) {
            _this4.$set(_this4.form, "password", $$v);
          }
        }
      })]), h("el-form-item", {
        "attrs": {
          "label": "用户等级",
          "prop": "level"
        }
      }, [h("el-select", {
        "style": "width: 100%",
        "model": {
          value: _this4.form.level,
          callback: function callback($$v) {
            _this4.$set(_this4.form, "level", $$v);
          }
        }
      }, [this.levels.map(function (v) {
        return h("el-option", {
          "key": v.code,
          "attrs": {
            "value": v.code,
            "label": v.name
          }
        });
      })])]), h("el-button", {
        "attrs": {
          "size": "mini",
          "disabled": Object.keys(this.form).some(function (k) {
            return !_this4.form[k];
          }),
          "type": "primary"
        },
        "style": "width: 100%",
        "on": {
          "click": this.submit.bind(this, 'login')
        }
      }, ["\u767B\u5F55"]), h("div", {
        "class": "forget-password"
      }, [h("span", {
        "on": {
          "click": this.forgetPassword
        }
      }, ["\u4FEE\u6539\u5BC6\u7801"])])]) : h("el-form", helper_default()([{
        "ref": "form"
      }, {
        "props": {
          model: this.forgetPasswordForm
        }
      }, {
        "attrs": {
          "label-width": "80px",
          "size": "mini"
        },
        "nativeOn": {
          "keydown": this.formSubmit.bind(this, 'forget')
        }
      }]), [h("el-form-item", {
        "attrs": {
          "label": "账号",
          "prop": "username"
        }
      }, [h("el-input", {
        "model": {
          value: _this4.forgetPasswordForm.username,
          callback: function callback($$v) {
            _this4.$set(_this4.forgetPasswordForm, "username", $$v);
          }
        }
      })]), h("el-form-item", {
        "attrs": {
          "label": "原密码",
          "prop": "old_pwd"
        }
      }, [h("el-input", {
        "attrs": {
          "type": "password"
        },
        "model": {
          value: _this4.forgetPasswordForm.old_pwd,
          callback: function callback($$v) {
            _this4.$set(_this4.forgetPasswordForm, "old_pwd", $$v);
          }
        }
      })]), h("el-form-item", {
        "attrs": {
          "label": "新密码",
          "prop": "new_pwd"
        }
      }, [h("el-input", {
        "attrs": {
          "type": "password"
        },
        "model": {
          value: _this4.forgetPasswordForm.new_pwd,
          callback: function callback($$v) {
            _this4.$set(_this4.forgetPasswordForm, "new_pwd", $$v);
          }
        }
      })]), h("div", {
        "class": "btn-container"
      }, [h("el-button", {
        "attrs": {
          "size": "mini",
          "type": "primary"
        },
        "style": "width: 48%",
        "on": {
          "click": this.backLogin
        }
      }, ["\u53D6\u6D88"]), h("el-button", {
        "attrs": {
          "size": "mini",
          "disabled": Object.keys(this.forgetPasswordForm).some(function (k) {
            return !_this4.forgetPasswordForm[k];
          }),
          "type": "primary"
        },
        "style": "width: 48%",
        "on": {
          "click": this.submit.bind(this, 'forget')
        }
      }, ["\u786E\u8BA4\u4FEE\u6539"])])]);
    }
  }]);

  return Login;
}(Object(vue_class_component_esm["c" /* mixins */])(httpMixin["a" /* default */]));

loginvue_type_script_lang_tsx_Login = Object(tslib_es6["a" /* __decorate */])([Object(vue_property_decorator["a" /* Component */])({
  computed: Object(objectSpread2["a" /* default */])({}, Object(external_Vuex_["mapState"])("product_manager", ['levels'])),
  methods: Object(objectSpread2["a" /* default */])({}, Object(external_Vuex_["mapMutations"])("product_manager", ['setLoginStatus', 'setUserName']))
})], loginvue_type_script_lang_tsx_Login);
/* harmony default export */ var loginvue_type_script_lang_tsx_ = (loginvue_type_script_lang_tsx_Login);
// CONCATENATED MODULE: ./src/components/login.vue?vue&type=script&lang=tsx&
 /* harmony default export */ var components_loginvue_type_script_lang_tsx_ = (loginvue_type_script_lang_tsx_); 
// EXTERNAL MODULE: ./src/components/login.vue?vue&type=style&index=0&id=6d1ffca7&lang=stylus&scoped=true&
var loginvue_type_style_index_0_id_6d1ffca7_lang_stylus_scoped_true_ = __webpack_require__("7197");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/components/login.vue
var login_render, staticRenderFns





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_loginvue_type_script_lang_tsx_,
  login_render,
  staticRenderFns,
  false,
  null,
  "6d1ffca7",
  null
  
)

/* harmony default export */ var login = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ "1fe4":
/***/ (function(module, exports, __webpack_require__) {

// Imports
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
exports = ___CSS_LOADER_API_IMPORT___(false);
// Module
exports.push([module.i, ".forget-password[data-v-6d1ffca7]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:10px}.forget-password>span[data-v-6d1ffca7]{color:#37a3f0;font-size:12px;cursor:pointer}.btn-container[data-v-6d1ffca7]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}", ""]);
// Exports
module.exports = exports;


/***/ }),

/***/ "2bb0":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("5530");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("d4ec");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("bee2");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
var inherits = __webpack_require__("262e");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 2 modules
var createSuper = __webpack_require__("2caf");

// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
var tslib_es6 = __webpack_require__("9ab4");

// EXTERNAL MODULE: ./node_modules/vue-property-decorator/lib/vue-property-decorator.js
var vue_property_decorator = __webpack_require__("60a3");

// EXTERNAL MODULE: ./node_modules/vue-class-component/dist/vue-class-component.esm.js
var vue_class_component_esm = __webpack_require__("2fe1");

// EXTERNAL MODULE: ./src/mixins/httpMixin.ts
var httpMixin = __webpack_require__("81dc");

// EXTERNAL MODULE: external "Vuex"
var external_Vuex_ = __webpack_require__("5880");

// EXTERNAL MODULE: ./node_modules/js-cookie/dist/js.cookie.js
var js_cookie = __webpack_require__("852e");
var js_cookie_default = /*#__PURE__*/__webpack_require__.n(js_cookie);

// EXTERNAL MODULE: ./src/components/login.vue + 2 modules
var login = __webpack_require__("1954");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/loginBtn.vue?vue&type=script&lang=tsx&













var loginBtnvue_type_script_lang_tsx_LoginBtn = /*#__PURE__*/function (_mixins) {
  Object(inherits["a" /* default */])(LoginBtn, _mixins);

  var _super = Object(createSuper["a" /* default */])(LoginBtn);

  function LoginBtn() {
    Object(classCallCheck["a" /* default */])(this, LoginBtn);

    return _super.apply(this, arguments);
  }

  Object(createClass["a" /* default */])(LoginBtn, [{
    key: "resetForm",
    value: function resetForm() {
      var login = this.$refs.login;
      login.resetForm();
    }
  }, {
    key: "logout",
    value: function logout() {
      var _this = this;

      this.$q.loading.show();
      this.http.logout().then(function (res) {
        _this.$q.loading.hide();

        js_cookie_default.a.remove('logined');
        js_cookie_default.a.remove('userName');

        _this.setLoginStatus(false);

        _this.setUserName(false);
      }).catch(function (err) {
        _this.$q.loading.hide();

        _this.showNotify({
          message: typeof err === 'string' ? err : '登出失败',
          type: 'negative',
          position: 'top',
          timeout: 2000
        });
      });
    }
  }, {
    key: "render",
    value: function render() {
      var h = arguments[0];
      return this.isLogined ? h("span", {
        "class": "user-name"
      }, ["\u6B22\u8FCE, ", h("b", {
        "class": "name"
      }, [this.userName]), ", ", h("b", {
        "class": "logout",
        "on": {
          "click": this.logout
        }
      }, ["\u9000\u51FA"])]) : h("el-popover", {
        "attrs": {
          "placement": "bottom",
          "width": "300",
          "trigger": "click"
        },
        "on": {
          "after-leave": this.resetForm
        }
      }, [h(login["default"], {
        "ref": "login"
      }), h("span", {
        "slot": "reference",
        "class": "login"
      }, ["\u767B\u5F55"])]);
    }
  }]);

  return LoginBtn;
}(Object(vue_class_component_esm["c" /* mixins */])(httpMixin["a" /* default */]));

loginBtnvue_type_script_lang_tsx_LoginBtn = Object(tslib_es6["a" /* __decorate */])([Object(vue_property_decorator["a" /* Component */])({
  computed: Object(objectSpread2["a" /* default */])({}, Object(external_Vuex_["mapState"])("product_manager", ['isLogined', 'userName'])),
  methods: Object(objectSpread2["a" /* default */])({}, Object(external_Vuex_["mapMutations"])("product_manager", ['setLoginStatus', 'setUserName']))
})], loginBtnvue_type_script_lang_tsx_LoginBtn);
/* harmony default export */ var loginBtnvue_type_script_lang_tsx_ = (loginBtnvue_type_script_lang_tsx_LoginBtn);
// CONCATENATED MODULE: ./src/components/loginBtn.vue?vue&type=script&lang=tsx&
 /* harmony default export */ var components_loginBtnvue_type_script_lang_tsx_ = (loginBtnvue_type_script_lang_tsx_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/components/loginBtn.vue
var loginBtn_render, staticRenderFns




/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_loginBtnvue_type_script_lang_tsx_,
  loginBtn_render,
  staticRenderFns,
  false,
  null,
  "56275948",
  null
  
)

/* harmony default export */ var loginBtn = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ "56efc":
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__("1fe4");
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__("499e").default
var update = add("6f540cd4", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

/***/ "64cc":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ createQueryStringUrl; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ isObject; });
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createHttpHelp; });

// UNUSED EXPORTS: setLocalStorage, getLocalStorage, awaitFunc

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules
var toConsumableArray = __webpack_require__("2909");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("1da1");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("53ca");

// EXTERNAL MODULE: ./node_modules/regenerator-runtime/runtime.js
var runtime = __webpack_require__("96cf");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("b64b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
var es_promise = __webpack_require__("e6cf");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.finally.js
var es_promise_finally = __webpack_require__("a79d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.apply.js
var es_reflect_apply = __webpack_require__("a6fd");

// EXTERNAL MODULE: external "Vue"
var external_Vue_ = __webpack_require__("8bbf");
var external_Vue_default = /*#__PURE__*/__webpack_require__.n(external_Vue_);

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("5530");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
var es_object_assign = __webpack_require__("cca6");

// EXTERNAL MODULE: ./src/statics/assets/symbolManager.ts
var symbolManager = __webpack_require__("bc82");

// CONCATENATED MODULE: ./src/api/http/httpWrap.ts





 // module的axios配置

var configSub = {
  timeout: 600000
}; // 合并config

function setConfig(config) {
  config = Object.assign({}, configSub, config);

  if (true) {
    config.scopeName = "product_manager";
  }

  return config;
}

function createProxy(func) {
  return new Proxy(func, {
    apply: function apply(target, ctx, args) {
      var key = symbolManager["a" /* default */].get('httpConfig');

      if (isObject(external_Vue_default.a.prototype[key])) {
        if (isObject(args[args.length - 1])) {
          args[args.length - 1] = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, external_Vue_default.a.prototype[key]), args[args.length - 1]);
        } else {
          args.push(external_Vue_default.a.prototype[key]);
        }
      }

      return Reflect.apply(target, ctx, args);
    }
  });
}

var _get = createProxy(function (url, succ, fail) {
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  var $get = external_Vue_default.a.prototype.$mg_get;
  config = setConfig(config);
  $get(url, succ, fail, config);
});
var _delete = createProxy(function (url, succ, fail) {
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  var $delete = external_Vue_default.a.prototype.$mg_delete;
  config = setConfig(config);
  $delete(url, succ, fail, config);
});
var _post = createProxy(function (url, param, succ, fail) {
  var config = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  var $post = external_Vue_default.a.prototype.$mg_post;
  config = setConfig(config);
  $post(url, param, succ, fail, config);
});
var _put = createProxy(function (url, param, succ, fail) {
  var config = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  var $put = external_Vue_default.a.prototype.$mg_put;
  config = setConfig(config);
  $put(url, param, succ, fail, config);
});
// CONCATENATED MODULE: ./src/api/http/serverRequests.ts





/**
 * 单例模式：
 * 直接在下面添加请求函数，或者另外新建一个.ts文件，比如有一个apis.ts
 * import apis from './apis
 *
 * const request = {
 *     ...apis
 * }
 *
 * 使用时: this.http.xxx<T>()
 *
 * 多例模式：
 * 根据业务或者模块不同，将不同的请求分开维护，比如有一个登录模块，在本目录新建auth.ts
 * import auth from './auth'
 *
 * const request = {
 *     // 注意： 不需要展开，auth即为module名
 *     auth
 * }
 *
 * 使用时: this.http.auth.xxx<T>()
 */

var request = {
  // server端对接的http接口均在此声明(调用$get | $delete | $post | $put)
  // 如有需要,可在最后一个参数中指定其他域名({ baseURL: 'http://192.168.20.186:80' }),该项参数可选
  // 新增：fromThirdOrg参数，为true时可避免url被自动添加组织名，默认为false，如下例
  // succ会在server端成功返回response时调用
  allapps: function allapps(succ, fail) {
    _get('api/config/allapps', succ, fail, {
      baseURL: 'http://192.168.20.186:80',
      fromThirdOrg: true
    });
  },
  importWorkorder: function importWorkorder(data, succ, fail) {
    _post('product_manage/issue_order_by_excel', data, succ, fail);
  },
  getLevels: function getLevels(succ, fail) {
    _get('user/get_params', succ, fail);
  },
  login: function login(data, succ, fail) {
    _post('user/login_check', data, succ, fail);
  },
  searchProduct: function searchProduct(data, succ, fail) {
    _get(createQueryStringUrl('product_manage/production_query', data), succ, fail);
  },
  logout: function logout(succ, fail) {
    _post('user/logout', null, succ, fail);
  },
  changePwd: function changePwd(data, succ, fail) {
    _post('user/change_pwd', data, succ, fail);
  }
};

var serverRequests_getFunc = function getFunc(target, key) {
  if (!Object.prototype.hasOwnProperty.call(target, key)) {
    return target[key];
  }

  if (isObject(target[key])) {
    return new Proxy(target[key], {
      get: getFunc
    });
  } else if (typeof target[key] === 'function') {
    return new Proxy(target[key], {
      apply: function apply(target, ctx, args) {
        Object.defineProperty(external_Vue_default.a.prototype, symbolManager["a" /* default */].get('httpConfig'), {
          value: args[args.length - 1],
          writable: false,
          configurable: true
        });
        return Reflect.apply(target, ctx, args);
      }
    });
  } else {
    return target[key];
  }
};

/* harmony default export */ var serverRequests = (new Proxy(request, {
  get: serverRequests_getFunc
}));
// EXTERNAL MODULE: ./node_modules/axios/index.js
var axios = __webpack_require__("bc3a");
var axios_default = /*#__PURE__*/__webpack_require__.n(axios);

// EXTERNAL MODULE: ./src/store/index.ts + 4 modules
var store = __webpack_require__("0613");

// CONCATENATED MODULE: ./src/statics/assets/utils.ts














var scopeName = "product_manager";
var utils_store;

if (external_Vue_default.a.prototype.isPortal) {
  utils_store = window[window.poolName].store;
} else {
  utils_store = store["a" /* default */];
} // 获取带组织名和模块名的localStorage


var getLocalStorage = function getLocalStorage(name) {
  if (!name) throw new Error('name of getLocalStorage is required');
  var result = localStorage.getItem("".concat(utils_store.state.organization ? "".concat(utils_store.state.organization, "-") : '').concat(scopeName, "-").concat(name));
  return result ? JSON.parse(result) : result;
}; // 设置带组织名和模块名的localStorage


var setLocalStorage = function setLocalStorage(name, value) {
  if (!name) throw new Error('name of setLocalStorage is required');
  return localStorage.setItem("".concat(utils_store.state.organization ? "".concat(utils_store.state.organization, "-") : '').concat(scopeName, "-").concat(name), JSON.stringify(value));
}; // 判断数据是否为对象


function isObject(value) {
  var result = Object.prototype.toString.call(value);
  return result === '[object Object]';
}

function createQueryStringUrl(url, obj) {
  if (Object(esm_typeof["a" /* default */])(obj) !== 'object' || obj === null) return url;
  var keys = Object.keys(obj);

  if (keys.length) {
    url = url + '?';
  }

  keys.map(function (k, i, arr) {
    url = url + k + '=' + obj[k] + (i === arr.length - 1 ? '' : '&');
  });
  return url;
}

function awaitFunc(_x) {
  return _awaitFunc.apply(this, arguments);
}
/**
 * @function 创建http请求辅助函数
 * @param token axios的取消token
 * @param mode http模式，多模块或者是单一模块
 */


function _awaitFunc() {
  _awaitFunc = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee(likePromise) {
    var res;
    return regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            _context.next = 2;
            return new Promise(function (resolve) {
              likePromise.then(function (r) {
                res = {
                  status: 'succ',
                  data: r
                };
              }).catch(function (e) {
                res = {
                  status: 'fail',
                  reason: e
                };
              }).finally(function () {
                resolve();
              });
            });

          case 2:
            return _context.abrupt("return", res);

          case 3:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return _awaitFunc.apply(this, arguments);
}

function createHttpHelp(arg) {
  /**
   * @function http请求promise化
   * @param param 请求的参数，特别注意：若没有参数并且需要传config，param需要传undefined而不是null
   * @param config 请求的配置，其中cancelToken若不传会被token覆盖（若token存在）
   * @return Proxy
   * 使用时: this.http.xx.xx<T> 建议传入泛型，项目赶时间可不传，默认为any
   */
  var token = arg.token,
      _arg$mode = arg.mode,
      mode = _arg$mode === void 0 ? 'single' : _arg$mode;

  if (mode !== 'single' && mode !== 'model') {
    mode = 'single';
  }

  var httpFunc;

  function httpHelp(param, config) {
    if (config && !config.cancelToken && token) {
      config.cancelToken = token;
    } else if (!config && token) {
      config = {
        cancelToken: token
      };
    }

    return new Promise(function (resolve, reject) {
      httpFunc.apply(void 0, [].concat(Object(toConsumableArray["a" /* default */])(param !== undefined ? [param] : []), [function (res) {
        if (Object.prototype.toString.call(res.data) === '[object Blob]') {
          var fileReader = new FileReader();

          fileReader.onload = function () {
            try {
              var result = fileReader.result;

              if (typeof result === 'string') {
                var json = JSON.parse(result);

                if (json.code !== 'fail') {
                  resolve(json.data);
                } else {
                  reject(json.info);
                }

                return;
              }

              throw new Error();
            } catch (_unused) {
              resolve(res);
            }
          };

          fileReader.readAsText(res.data);
        } else {
          if (res.code !== 'fail') {
            resolve(res.data);
          } else {
            reject(res.info);
          }
        }
      }, function (err) {
        if (!axios_default.a.isCancel(err)) {
          reject(err);
        }
      }, config || {}]));
    });
  }

  var getFunc = function getFunc(cacheHttp) {
    return function (target, key) {
      if (mode === 'single') {
        httpFunc = serverRequests[key];
        return httpHelp;
      } else {
        if (isObject(cacheHttp[key])) {
          return new Proxy({}, {
            get: getFunc(cacheHttp[key])
          });
        } else {
          httpFunc = cacheHttp[key];
          return httpHelp;
        }
      }
    };
  };

  return new Proxy({}, {
    get: getFunc(serverRequests)
  });
}



/***/ }),

/***/ "7197":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_6d1ffca7_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("56efc");
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_6d1ffca7_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_6d1ffca7_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "81dc":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d4ec");
/* harmony import */ var F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("bee2");
/* harmony import */ var F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("257e");
/* harmony import */ var F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("262e");
/* harmony import */ var F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2caf");
/* harmony import */ var F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ade3");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("99af");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("9ab4");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("8bbf");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("bc3a");
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var vue_property_decorator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("60a3");
/* harmony import */ var assets_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("64cc");








/**
 * http混入
 * 在有http请求的组件中
 * 可混入此部分
 * 后续发送请求
 * 可直接调用this.http
 * this.http的参数部分详解参见createHttpHelp
 * 默认http模式为单模块，若需要改为多模块，在自己组件内重新定义httpMode为'model'来覆盖mixins内的httpMode
 * 选项式写法参考Vue2官网
 * tsx写法混入示例：
 * import { mixins } from 'vue-class-component'
 *
 * class A extends mixins(httpMixin) { ... }
 */






var HttpMixin = /*#__PURE__*/function (_Vue) {
  Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(HttpMixin, _Vue);

  var _super = Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(HttpMixin);

  function HttpMixin() {
    var _this;

    Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, HttpMixin);

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _super.call.apply(_super, [this].concat(args));

    Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_this), "__source", void 0);

    Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_this), "promiseStatus", 'fulfilled');

    Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_this), "httpMode", 'single');

    Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_this), "http", void 0);

    return _this;
  }

  Object(F_old_E_project_chengdu_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(HttpMixin, [{
    key: "created",
    value: function created() {
      this.createHttp();
    }
  }, {
    key: "activated",
    value: function activated() {
      this.promiseStatus === 'fulfilled' && this.createHttp();
    }
  }, {
    key: "beforeRouteLeave",
    value: function beforeRouteLeave(to, from, next) {
      this.__source && this.__source.cancel();
      this.promiseStatus = 'fulfilled';
      next();
    }
  }, {
    key: "createHttp",
    value: function createHttp() {
      var cancelToken = axios__WEBPACK_IMPORTED_MODULE_9___default.a.CancelToken;
      this.__source = cancelToken.source();
      this.http = Object(assets_utils__WEBPACK_IMPORTED_MODULE_11__[/* createHttpHelp */ "a"])({
        token: this.__source.token,
        mode: this.httpMode
      });
      this.promiseStatus = 'pending';
    }
  }]);

  return HttpMixin;
}(vue__WEBPACK_IMPORTED_MODULE_8___default.a);

HttpMixin = Object(tslib__WEBPACK_IMPORTED_MODULE_7__[/* __decorate */ "a"])([vue_property_decorator__WEBPACK_IMPORTED_MODULE_10__[/* Component */ "a"]], HttpMixin);
/* harmony default export */ __webpack_exports__["a"] = (HttpMixin);

/***/ }),

/***/ "bc82":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a4d3");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e01a");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d3b7");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("99af");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("e260");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("4ec9");
/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("3ca3");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ddb0");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7__);








var isNode = typeof window === 'undefined';
var SYMBOL = isNode ? global.Symbol : window.Symbol ? window.Symbol : function () {
  function random() {
    var c = 'abcdefghijklmnopqrstuvwxyz0123456789';
    var cl = c.length;
    var r = '';

    for (var i = 0; i < 10; i++) {
      r += c[Math.floor(Math.random() * cl)];
    }

    return r;
  }

  return function (name) {
    if (name) {
      return "#".concat(name, "_").concat(random());
    } else {
      return "#_".concat(random());
    }
  };
}();
var mem = new Map();
var symbolManager = {
  get: function get(name) {
    if (name) {
      return mem.has(name) ? mem.get(name) : function () {
        mem.set(name, SYMBOL(name));
        return mem.get(name);
      }();
    } else {
      return SYMBOL('default');
    }
  }
};
/* harmony default export */ __webpack_exports__["a"] = (symbolManager);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))

/***/ })

}]);